<?php

if( ! defined('DOCROOT') )
{
    require_once '/var/www/advancelab/chilik2/unittest/bootstrap.php';
}

class RequestFileTest extends UnitTestCase
{
    function testingRequestFile()
    {
        $struct = new Entity\RequestFile();
        
        $this->assertIdentical($struct,new Entity\RequestFile);
        $this->assertTrue($struct instanceof Entity\RequestFile);
        
        $struct->mimeType = 'php';
        $this->assertEqual( 'php', $struct->mimeType);
        $struct->name = 'ezc';
        $this->assertEqual( 'ezc', $struct->name);
        $struct->size = 'ezp';
        $this->assertEqual( 'ezp', $struct->size);
        $struct->status = 'buddymiles';
        $this->assertEqual( 'buddymiles', $struct->status);
        $struct->tmpPath = 'buddyguy';
        $this->assertEqual( 'buddyguy', $struct->tmpPath);
        
        /* $this->dump($struct); */
    }
    
    public function testMockingMethod()
    {
        $state = array(
        'mimeType' => 'php',
        'name' => 'ezc',
        'size' => 'ezp',
        'status' => 'buddymiles',
        'tmpPath' => 'buddyguy',
        );
        
        $struct = Entity\RequestFile::__mock( $state );
        
        $this->assertEqual( 'php', $struct->mimeType);
        $this->assertEqual( 'ezc', $struct->name);
        $this->assertEqual( 'ezp', $struct->size);
        $this->assertEqual( 'buddymiles', $struct->status);
        $this->assertEqual( 'buddyguy', $struct->tmpPath);
    }
}

